<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background: red;
            border-radius: 50%;
            opacity: 0.3;
            filter: alpha(opacity:0.3);
            float: left;
            margin: 10px;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<script>
    var aDiv = document.getElementsByTagName('div');
    for(var i=0;i<aDiv.length;i++){
        aDiv[i].timer = null;
        aDiv[i].alpha = 30;
        aDiv[i].onmouseover = function () {
            startMove(this,100);
        }
        aDiv[i].onmouseout = function () {
            startMove(this,30);
        }
    }
    function startMove(obj,iTarget) {
        clearInterval(obj.timer);
        obj.timer = setInterval(function () {
            var speed = (iTarget-obj.alpha)/6;
            speed = speed>0?Math.ceil(speed):Math.floor(speed);

            if(obj.alpha == iTarget){
                clearInterval(obj.timer);
            }
            else {
                obj.alpha+=speed;
                obj.style.opacity = obj.alpha/100;
                obj.style.filter = 'alpha(opacity:'+obj.alpha+')';
            }


        },30)
    }


</script>
</body>
</html>